package com.qf.ceshi0616.category.vo;

import lombok.Data;

/**
 * @Author UNIQ7xi
 * @Date 2023/6/15 14:26
 * @Version v1.8
 **/
@Data
public class ResultVo {
    private Integer code;
    private String msg;
    private Object data;

    /**
     * 返回通用成功的响应信息
     * @return
     */
    public static ResultVo ok(){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(10000);
        resultVo.setMsg("success");
        return resultVo;
    }


    public static ResultVo ok(Object o){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(10000);
        resultVo.setMsg("success");
        resultVo.setData(o);
        return resultVo;
    }
}
